Optimal. Leaf size=21 \[ \frac{\tanh ^{-1}(\sin (c+d x))}{a d}-\frac{x}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0503932, antiderivative size = 21, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3888, 3770} \[ \frac{\tanh ^{-1}(\sin (c+d x))}{a d}-\frac{x}{a} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3888
Rule 3770
Rubi steps
\begin{align*} \int \frac{\tan ^2(c+d x)}{a+a \sec (c+d x)} \, dx &=\frac{\int (-a+a \sec (c+d x)) \, dx}{a^2}\\ &=-\frac{x}{a}+\frac{\int \sec (c+d x) \, dx}{a}\\ &=-\frac{x}{a}+\frac{\tanh ^{-1}(\sin (c+d x))}{a d}\\ \end{align*}
Mathematica [B] time = 0.0898872, size = 60, normalized size = 2.86 \[ -\frac{\log \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )+d x}{a d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.056, size = 59, normalized size = 2.8 \begin{align*} -2\,{\frac{\arctan \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) }{da}}+{\frac{1}{da}\ln \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +1 \right ) }-{\frac{1}{da}\ln \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) -1 \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.70849, size = 105, normalized size = 5. \begin{align*} -\frac{\frac{2 \, \arctan \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac{\log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} + \frac{\log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.17183, size = 93, normalized size = 4.43 \begin{align*} -\frac{2 \, d x - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (-\sin \left (d x + c\right ) + 1\right )}{2 \, a d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\tan ^{2}{\left (c + d x \right )}}{\sec{\left (c + d x \right )} + 1}\, dx}{a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.55859, size = 68, normalized size = 3.24 \begin{align*} -\frac{\frac{d x + c}{a} - \frac{\log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right )}{a} + \frac{\log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right )}{a}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]